<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <script src="https://unpkg.com/react@17/umd/react.development.js"></script>
  <script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
  <script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>

  <body>
    <div id="root"></div>
    <script type="text/babel">
      class Hello extends React.Component {
        render(){
          return <div>
            <h1>我是一个有状态组件</h1>
            <p>姓名：{this.props.name}</p>
            <p>年龄：{this.props.age}</p>
            <p>职业：前端开发</p>
            </div>
        }
      }
      ReactDOM.render(<Hello name='张三' age='19'  />, document.getElementById('root'))
    </script>
  </body>
</html>
